package com.xht.main;

import java.util.List;
import java.util.Map;

public class Person {

	private Car car;
	private int age;
	private String name;
	private String sex;
	private List<Car> cars;
	private Map map;
	public Map getMap() {
		return map;
	}
	public void setMap(Map map) {
		this.map = map;
	}
	public List<Car> getCars() {
		return cars;
	}
	@Override
	public String toString() {
		return "Person [car=" + car + ", age=" + age + ", name=" + name
				+ ", sex=" + sex + ", cars=" + cars + ", map=" + map + "]";
	}
	public void setCars(List<Car> cars) {
		this.cars = cars;
	}
	public void driveCar(){
		System.out.println(age +" years old "+sex+" named " + name + " drives a " + car);
	}
	public Car getCar() {
		return car;
	}
	public void setCar(Car car) {
		this.car = car;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
}
